package io.renren.modules.store.service.impl;

import io.renren.modules.store.dao.TStoreStaffCommissionTypeDao;
import io.renren.modules.store.entity.TStoreStaffCommissionTypeEntity;
import io.renren.modules.store.service.TStoreStaffCommissionTypeService;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;


@Service("tStoreStaffCommissionTypeService")
public class TStoreStaffCommissionTypeServiceImpl extends ServiceImpl<TStoreStaffCommissionTypeDao, TStoreStaffCommissionTypeEntity> implements TStoreStaffCommissionTypeService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TStoreStaffCommissionTypeEntity> page = this.page(
                new Query<TStoreStaffCommissionTypeEntity>().getPage(params),
                new QueryWrapper<TStoreStaffCommissionTypeEntity>()
                .eq(!params.get("sellerId").equals(""),"seller_id",params.get("sellerId"))
        );

        return new PageUtils(page);
    }

}